package com.action.sanction;

import java.util.ArrayList;

import com.db.appline.AppLineManager;
import com.db.appline.AppLineVO;
import com.db.appline.ApprovalLineVO;
import com.db.appline.RepDateVO;
import com.db.member.MemInfoVO;
import com.db.member.MemberManager;
import com.opensymphony.xwork2.ActionContext;

public class ExpenseActAction {
	private int memno;
	private MemInfoVO vo = new MemInfoVO();
	private ArrayList<AppLineVO> list = new ArrayList<AppLineVO>();
	private ArrayList<ApprovalLineVO> applist = new ArrayList<ApprovalLineVO>();
	private RepDateVO dateVo = new RepDateVO();
	
	
	
	
	public void setMemno(int memno) {
		this.memno = memno;
	}

	
	
	public int getMemno() {
		return memno;
	}



	public MemInfoVO getVo() {
		return vo;
	}

	public ArrayList<AppLineVO> getList() {
		return list;
	}
	
	

	public ArrayList<ApprovalLineVO> getApplist() {
		return applist;
	}
	
	

	public RepDateVO getDateVo() {
		return dateVo;
	}

	public String execute() throws Exception {

		dateVo = AppLineManager.getRepdate();
memno = Integer.parseInt((String) ActionContext.getContext().getSession().get("memno"));//////////////////////////////////////////////////
		
		System.out.println(memno);
		System.out.println(dateVo.getPredate());
		System.out.println(dateVo.getRepdate());
		
		vo = MemberManager.meminfoData(memno);///////////////////////////////// 

		list = (ArrayList<AppLineVO>) AppLineManager.memberAppLineData(memno);//////////
		
		applist = (ArrayList<ApprovalLineVO>) AppLineManager.approvalLine(memno);/////////

		return "success";
	}
}
